package com.cykj.controller;

import com.cykj.service.OrderService;
import com.cykj.util.ResponseDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/order")
public class OrderController {
    @Autowired
    private OrderService orderService;

    @RequestMapping("/delete")
    public ResponseDto delete(int id){
        return orderService.delete(id);
    }
    @RequestMapping("/alter")
    public ResponseDto alter(int id, int userId,String name, String price){
        return orderService.alter(id, userId, name, price);
    }

}
